import React from "react"
const Home = React.lazy(() => import("../pages/Home"))
const About = React.lazy(() => import("../pages/About"))
const Message = React.lazy(() => import("../pages/Message"))
const News = React.lazy(() => import("../pages/News"))
const Detail = React.lazy(() => import("../pages/Detail"))

const routes = [
  {
    path: "/",
    element: <Home></Home>,
  },
  {
    path: "/home",
    element: <Home></Home>,
    children: [
      {
        path: "news",
        element: <News></News>,
      },
      {
        path: "message",
        element: <Message></Message>,
        children: [
          {
            path: "detail/:id",
            element: <Detail></Detail>,
          },
        ],
      },
    ],
  },
  {
    path: "/about",
    element: <About></About>,
  },
]

export default routes
